<?php
    $dbcnx = mysqli_connect("216.185.102.20", "darylho","8604923?", "mfidatabase");
/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

$time_stamp='';
//variable user to insert into table
//$time_stamp=$_POST['timeStamp'];
	$time_stamp =$_POST['timeStamp'];
//echo "sucessful $time_stamp";

//create query
$time_stamp_query= "SELECT time_added FROM creditscoresectionD ORDER by ASC";

	if($result = $dbcnx -> query("SELECT time_added FROM `creditscoresectionD` ORDER by `id` DESC LIMIT 1 ")){
		while($obj = mysqli_fetch_array($result)){
		
		//for ($i = 0 ; $i < sizeof($obj); $i++){
		//if($time_added < $time_stamp){
			/*** cast the object ***/
			
			/*** show the result ***/
			//echo "Welcome, '.$array.'";
			 if($obj["time_added"] > $time_stamp){
			 	//echo implode(':', $obj);
			 	echo "newUpdate/$obj[time_added]";
				//echo newUpdate;
			 } else{
			 	echo noUpdate;
			 }
				
				
			 
			//get the last element in the time added
			//echo $obj[time_added];
		
		//}
		} 
	}
	
mysqli_close($dbcnx);

// execute and process data
	

?>